<h2><?php echo __('Taxas'); ?></h2>
<?php if(!empty($dados)){?>
<?php // TODO DONE Mudar data formato de Human-Readable?>
<table class="table table-bordered table-striped table-hover table-small text-center">
	<thead>
	<tr>
		<th></th>
		<th></th>
		<?php foreach($associacoes as $item){?>
			<th><?php echo $item;?></th>
		<?php }?>
	</tr>
	</thead>
	<tbody>
	<?php foreach($dados as $data_inicio=>$data_fim_interno){?>
		<?php foreach($data_fim_interno as $data_fim=>$array_dados){?>
			<tr>
				<td rowspan="<?php echo count($especializacoes);?>">
					<?php echo __('De').' '.$this->Time->format('d/m/Y', $data_inicio).'<br> '.__('até').' '.$this->Time->format('d/m/Y', $data_fim);?> </td>
				<?php $primeiro = true;?>
				<?php foreach ($especializacoes as $espec_id=>$especializacao){?>
					<?php if(!$primeiro){?>
						<tr>
						<?php }else{?>
						<?php $primeiro = false;?>
					<?php }?>
					<td><?php echo $especializacao;?></td>
					<?php foreach($associacoes as $assoc_id=>$associacao){?>
						<?php $preco_id = $dados[$data_inicio][$data_fim][$assoc_id][$espec_id];?>
						<?php if($preco_id['preco'] < 0){?>
							<td> - </td>
						<?php }else{?>
							<td><?php echo 'R$ '.number_format($preco_id['preco'], 2, ',', '.');?></td>
						<?php }?>
					<?php }?>
					</tr>
				<?php }?>
			<?php }?>
	<?php }?>
	</tbody>
</table>
<?php }?>
